//
//  UIButton+Extension.m
//  HMWeiBoOC
//
//  Created by GD on 16/9/24.
//  Copyright © 2016年 geduo. All rights reserved.
//

#import "UIButton+Extension.h"

@implementation UIButton (Extension)

-(instancetype)initWithImageName:(NSString *)imageName title:(NSString *)title{

    if (self = [super init]) {
        [self setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
        [self setTitle:title forState:UIControlStateNormal];
        
        self.titleLabel.font = [UIFont systemFontOfSize:14];
        [self setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
    
        [self setBackgroundImage:[UIImage imageNamed:@"timeline_card_bottom_background"] forState:UIControlStateNormal];
        
        self.adjustsImageWhenHighlighted = NO;
    }
    
    return self;
}

@end
